// 通用道具接口
const mongoose = require('mongoose');
const Good = require('../models/Goods/Good');

exports.getallGoodInfo = async (req, res) => {
    goodInfo = Good.find().populate('goods_type', '_id name')
    .exec((err,good) => {
        if(err)return res.status(404),json(err);
        if(!good){
            return res.status(404),json('没有任何物品');
        }
        return res.json(good);
    });
};

